<template>
  <div class="home-wrap" ref="refHomePage">
    <!--头部-->
    <van-nav-bar
      title="标题"
      left-text="返回"
      right-text="按钮"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
    />
    {{}}
    <van-tabbar v-model="active">
      <van-tabbar-item icon="home-o">标签</van-tabbar-item>
      <van-tabbar-item icon="search">标签</van-tabbar-item>
      <van-tabbar-item icon="friends-o">标签</van-tabbar-item>
      <van-tabbar-item icon="setting-o">标签</van-tabbar-item>
    </van-tabbar>
  </div>
  
</template>

<script>
import {getProductList} from '@/api/index'
export default {
  name: "home",
  filters: {
    getPrice(value) {
      return value.toString().split(".")[0];
    }
  },
  data() {
    return {
      //底部导航栏跳转索引
      active: 0,
    };
  },
  mounted(){
    this.getList();
    
  },
  methods:{
    onClickLeft(){
      this.$router.go(-1);
    },
    onClickRight(){
      console.log(1)
    },
    async getList(){
      let  {code,data} =await getProductList();
      if(code === 0){
        console.log(data)
      }
    }
  }  
  
};
</script>

<style type="text/scss" lang="scss" scoped>
.home-wrap {
  height: 100vh;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  .header {
    width: 100%;
    z-index: 2100;
    .down-box {
      width: 100%;
      height: 120px;
      padding: 20px 32px;
      background-color: #00abf9;
      color: #fff;
      display: flex;
      align-items: center;
      font-size: 24px;
      position: relative;
      .down-manner {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 120px;
        background-size: contain;
      }
      .left {
        i {
          font-size: 40px;
          vertical-align: text-bottom;
          z-index: 2;
        }
      }
      .downloadText {
        margin-left: 24px;
        z-index: 2;
        span {
          font-size: 28px;
          font-weight: 400;
          line-height: 40px;
          display: block;
        }
      }
      .right {
        margin-left: 200px;
        background-color: #ffcb3c;
        border-radius: 6px;
        width: 132px;
        height: 48px;
        z-index: 2;
        a {
          display: block;
          line-height: 48px;
          text-align: center;
          color: #fff;
        }
      }
    }
  }
  .bannerSearch {
    position: relative;
    .banner {
      height: 420px;
      position: relative;
      z-index: 3;
      .search-box {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 10;
        height: 108px;
        padding: 20px 32px;
        display: flex;
        justify-content: space-between;
        color: #fff;
        width: 100%;
        align-items: center;
        .left {
          flex: 1;
          height: 72px;
          padding: 12px 14px;
          border-radius: 36px;
          background-color: rgba(255, 255, 255, 0.8);
          display: flex;
          align-items: center;
          span {
            font-size: 28px;
            margin-left: 16px;
            color: #2d2d2d;
          }
          img {
            width: 32px;
            height: 32px;
          }
        }
        .right {
          padding-left: 32px;
          margin-top: 10px;
          img {
            width: 52px;
            height: 52px;
          }
        }
      }
    }
    a {
      display: inline-block;
      width: 100%;
      height: 420px;
    }
    img {
      height: 420px;
      width: 100%;
    }
  }
  .page-load-box {
    text-align: center;
    margin-top: 40px;
    font-size: 28px;
    & > div {
      line-height: 40px;
      margin-top: 20px;
      color: #00abf9;
    }
  }
  .entry-block {
    padding: 40px 10px 0 10px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    background-color: #fff;
    &.last {
      padding: 16px 10px 40px 10px;
    }
    & > div {
      width: 20%;
    }
    .title {
      color: #191919;
      font-size: 24px;
    }
    img {
      width: 80px;
      height: 80px;
      display: inline-block;
    }
    .entry-tourism {
      display: block;
    }
  }

  .hot-target,
  .sale-time-box,
  .service-xf {
    padding: 12px 32px;
    background-color: #fff;
    .title {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-bottom: 18px;
      .name {
        color: #191919;
        font-size: 48px;
      }
      .link-all {
        color: #00abf9;
        font-size: 24px;
      }
      i {
        vertical-align: text-top;
      }
    }
  }
  .sale-time-box {
    margin-top: 24px;
  }
  .service-xf {
    margin-bottom: 30px;
    .content {
      box-shadow: 0px 0px 12px rgba(57, 57, 57, 0.15);
      border-radius: 20px;
      padding: 24px;
      margin-top: 10px;
      .item {
        display: flex;
        font-size: 24px;
        line-height: 34px;
        color: #aeaeae;
        margin-bottom: 30px;
        align-items: center;
        &:last-child {
          margin-bottom: 0;
        }
        span {
          color: #393939;
        }
      }
      .img-box {
        width: 60px;
      }
      img {
        width: 60px;
        height: 60px;
      }
      .text {
        flex: 1;
        padding-left: 20px;
      }
    }
  }
  .product-list {
    // height: 100%;
    padding-bottom: 110px;
    .vue-waterfall-easy-scroll {
      width: 100%;
      padding: 0 32px;
      min-height: 520px;
    }
    .vue-waterfall-easy {
      position: relative;
      width: 100%;
      height: 100%;
      .img-box-water {
        position: absolute;
        font-size: 24px;
        width: 334px;
        border-radius: 8px;
        img {
          height: 334px;
          width: 334px;
          display: block;
          border-radius: 8px 8px 0 0;
        }
        .content {
          background: linear-gradient(
            136deg,
            rgba(102, 201, 246, 1) 0%,
            rgba(106, 170, 235, 1) 100%
          );
          box-shadow: 0px 2px 12px rgba(57, 57, 57, 0.16);
          padding: 20px;
          color: #fff;
          font-size: 28px;
          line-height: 44px;
          margin-bottom: 20px;
          border-radius: 0 0 8px 8px;
          img {
            width: 21px;
            height: 21px;
            display: inline-block;
          }
          a.text {
            display: block;
            color: #fff;
          }
        }
      }
    }
    .product-tabs {
      padding: 20px 32px 0 32px;
      margin-bottom: 20px;
      span {
        display: inline-block;
        margin-right: 70px;
        font-size: 28px;
        color: #2d2d2d;
        font-weight: bold;
        &.active {
          color: #00abf9;
        }
      }
    }
    .tab-items-sub {
      padding: 0 32px;
      font-size: 24px;
      margin-bottom: 30px;
      span {
        height: 48px;
        border: 2px solid #00abf9;
        color: #00abf9;
        margin-right: 40px;
        line-height: 42px;
        display: inline-block;
        border-radius: 44px;
        padding: 0 16px;
        &.active {
          background-color: #00abf9;
          color: #fff;
        }
      }
    }
    .filish-bottom {
      text-align: center;
      font-size: 24px;
      color: #999;
    }
  }
  .count-down {
    margin-left: 10px;
  }
  .travel-calendar {
    margin-top: 20px;
    position: relative;
    .title-name {
      font-size: 48px;
      position: absolute;
      left: 32px;
      top: 10px;
      color: #2d2d2d;
      z-index: 2;
    }
    .tab-main-content {
      padding: 0 0 0 32px;
      font-size: 0;
    }
    .items {
      width: 100%;
      overflow: hidden;
      overflow-x: scroll;
      margin-top: 20px;
    }
    .box-lx {
      position: relative;
      white-space: nowrap;
      height: 368px;
      margin-bottom: 30px;
    }
    .info {
      width: 320px;
      border-radius: 8px;
      height: 368px;
      margin-right: 20px;
      display: inline-block;
      font-size: 24px;
      background-size: cover;
      background-repeat: no-repeat;
      padding: 20px;
      vertical-align: top;
      .lm-name {
        color: #fff;
        line-height: 40px;
        .fs14 {
          font-size: 28px;
        }
      }
    }
    .cp-mk {
      background: #fff;
      border-radius: 8px;
      line-height: 34px;
      padding: 10px;
      margin-top: 10px;
      display: block;
      color: #2d2d2d;
      .price {
        color: #f55e2f;
      }
      p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        &.grap {
          color: #aeaeae;
          font-size: 20px;
        }
      }
    }
  }
}
</style>
<style>
.home-wrap .van-swipe__indicator--active {
  width: 26px;
  height: 10px;
  border-radius: 12px;
}

.home-wrap .count-down span {
  width: 40px;
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 6px;
  line-height: 40px;
  font-weight: bold;
  text-align: center;
  margin-top: 6px;
}
.travel-calendar .van-tab {
  flex: none;
}
.travel-calendar .van-tabs__line {
  width: 40px !important;
}
.travel-calendar .van-tabs__nav--line {
  justify-content: flex-end;
  padding-right: 32px;
}
</style>
